{% extends "base.html" %}

{% block title %}
    下属考勤
{% endblock %}

{% block label %}
    <div class="col-lg-12">
        <h1 class="page-header">下属考勤管理</h1>
    </div>
{% endblock %}

{% block content %}
    <div class="col-lg-12">
        <table class="table">
            <thead>
            <tr>
                <th>请假人</th>
                <th>假条状态</th>
                <th>请假类型</th>
                <th>请假原因</th>
                <th>起始时间</th>
                <th>请假时长</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for a in a_list %}
            <tr>
                <td class="col-lg-1">{{ a.a_per.per_name }}</td>
                <td class="col-lg-1">
                    {% if a.a_state == 0 %}
                        申请中
                    {% elif a.a_state == 1 %}
                        通过
                    {% elif a.a_state == 2 %}
                        驳回
                    {% elif a.a_state == 3 %}
                        销假
                    {% endif %}
                </td>
                <td class="col-lg-1">{{ a.a_type }}</td>
                <td class="col-lg-3">{{ a.a_reason }}</td>
                <td class="col-lg-2">{{ a.a_time }}</td>
                <td class="col-lg-2">{{ a.a_long }}</td>
                <td class="col-lg-2">
                    {% if a.a_state != 1 and a.a_state != 3 %}
                    <a href="/verify/{{ a.id }}/?change=1" class="btn btn-default">通过</a>
                    {% else %}
                    <a href="" class="btn btn-default" disabled>通过</a>
                    {% endif %}
                    {% if a.a_state != 2 and a.a_state != 3 %}
                    <a href="/verify/{{ a.id }}/?change=2" class="btn btn-default">驳回</a>
                    {% else %}
                    <a href="" class="btn btn-default" disabled>驳回</a>
                    {% endif %}
                </td>
            </tr>
            {% endfor %}

            </tbody>
        </table>
    </div>
{% endblock %}
